<template>
	<view class="class_card">
		<view class="header">
			<image :src="query.image" mode="aspectFill" class="img"></image>
			<view class="right-box">
				<view class="row-box">
					<view class="name">
						{{query.title}}
					</view>
					<view class="right2" @click="$ROUTELINK('/pageA/course/detail?course='+ query.course_id)">
						<view class="size">
							课程详情
						</view>
						<u-icon name="arrow-right" color="#999999" size="14"></u-icon>
					</view>
				</view>
				<view class="number" v-if="query.finish =='unfinished'">
					<text class="size11">第</text>
					<text class="size22">{{query.ynmt}}</text>
					<text class="size11">丨共{{query.classes}}节</text>
				</view>
				<view class="number" v-if="query.finish =='finish'">
					<text class="size11">已完成{{query.classes}}节</text>
				</view>
				<view class="number" v-if="query.finish =='unfinished'">
					<text class="size11">{{query.time_str}}</text>
				</view>
			</view>
		</view>
		<view class="content mb">
			<view class="name">
				上课场地
			</view>
			<view class="route-right" @click="$ROUTELINK('/pageA/shop/particulars?shop_id=' + query.shop_id)">
				<text class="size23">{{query.shop_name}}</text>
				<u-icon name="arrow-right" color="#999999" size="14"></u-icon>
			</view>
		</view>
		<view class="content">
			<view class="name">
				上课场地
			</view>
			<view class="route-right" @click="$ROUTELINK('/pageA/shop/coach/deatil?coach_id=' + query.coach_id)">
				<image :src="query.coach_avatar" mode="aspectFill" class="img2"></image>
				<text class="size23">{{query.coach_nickname}}</text>
				<u-icon name="arrow-right" color="#999999" size="14"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			query: {
				type: Object,
				default: {},
				required: true
			},
			type:{
				type: String,
				default: 'record',
				required: true
			}
		}
	}
</script>

<style lang="scss" scoped>
	.class_card {
		width: 702rpx;
		height: 328rpx;
		background: #ffffff;
		border-radius: 16rpx;
		padding: 32rpx;

		.header {
			display: flex;
			flex-direction: row;
			width: 100%;
			margin-bottom: 32rpx;
			.img {
				width: 160rpx;
				height: 120rpx;
				background: rgba(0, 0, 0, 0.00);
				border-radius: 16rpx;
				margin-right: 20rpx;
			}

			.right-box {
				flex: 1;
				display: flex;
				flex-direction: column;

				.row-box {
					display: flex;
					flex-direction: row;
					align-items: center;
					margin-bottom: 8rpx;

					.name {
						font-size: 32rpx;
						font-family: PingFang SC, PingFang SC-Bold;
						font-weight: 700;
						text-align: left;
						color: #333333;
						flex: 1;
					}

					.right2 {
						display: flex;
						flex-direction: row;
						align-items: center;

						.size {
							font-size: 24rpx;
							font-family: PingFang SC, PingFang SC-Medium;
							font-weight: 500;
							text-align: left;
							color: #999999;
							margin-right: 7rpx;
						}
					}
				}
				.number{
					display: flex;
					flex-direction: row;
					align-items: center;
					.size11{
						font-size: 24rpx;
						font-family: PingFang SC, PingFang SC-Medium;
						font-weight: 500;
						text-align: left;
						color: #999999;
					}
					.size22{
						font-size: 24rpx;
						font-family: PingFang SC, PingFang SC-Medium;
						font-weight: 500;
						text-align: left;
						color: #73F0EA;
					}
				}
			}
		}
		.content{
			width: 100%;
			display: flex;
			flex-direction: row;
			align-items: center;
			.name{
				font-size: 28rpx;
				font-family: PingFang SC, PingFang SC-Bold;
				font-weight: 700;
				text-align: left;
				color: #333333;
				flex: 1;
			}
			.route-right{
				display: flex;
				flex-direction: row;
				align-items: center;
				.size23{
					font-size: 28rpx;
					font-family: PingFang SC, PingFang SC-Medium;
					font-weight: 500;
					color: #000000;
					margin: 0 11rpx 0 8rpx;
				}
				.img2{
					width: 40rpx;
					height: 40rpx;
					background: rgba(0,0,0,0.00);
					border-radius: 50%;
				}
			}
		}
		.mb{
			margin-bottom: 32rpx;
		}
	}
</style>